<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8" isELIgnored="false"%>
<%@ include file="/WEB-INF/views/shared/taglib.jsp"%>
<%
	request.setAttribute("title", "找回密码");
%>

<%@ include file="/WEB-INF/views/shared/master/weContentHeader.jsp"%>

<<style>

	.title {
		z-index: 0 !important;
	}
	.weui-cell__hd img{
		margin-right:15px;
	}
	
	.weui-cell:before{
		border-top:0px;
		
	}
	.weui-cell{
		padding:10px 0px 10px 0px;
		margin:0 auto;
		width:78%;
		border-bottom:1px solid #d9d9d9;	
	}
	
	.center-icon{
		width:125px;
		height:125px;
	}
	
	.imgBox{
		margin-top:25px;
		text-align:center;
	}
	
	.titlebox{
		margin-top:35px;
	}

	.bottom-lab {
			margin-top:40px;
			border-bottom:0px;
		}
	.bottom-btn {
			background-color: #2196F3;
			height:35px;
			line-height:35px;
		}
	
	.registration{
		color:grey;
	}
	
	.toolbar .picker-button {
		color:#2196F3;
	}
	
	.btn-code{
		float:right;
	}
	.input-code{
		width:60%;
	}
	.btn-text{
		background-color:white;
		color:#2196F3;
		padding:5px;
		border:1px solid #2196F3;	
	}
</style>

<%@ include file="/WEB-INF/views/shared/master/weTitle.jsp"%>

<div class="imgBox">
	<img class="center-icon" alt="" src="<c:url value="/images/we/registration/logo.png" />">
</div>
	
<div class="titlebox">

	<div class="weui-cell">
		<div class="weui-cell__hd">
			<img class="left-icon" alt="" src="<c:url value="/images/we/registration/phone.png" />">
		</div>
		<div class="weui-cell__bd">
			<input class="weui-input selected-color" id="phone" type="text" placeholder="手机号">
		</div>
	</div>
	<div class="weui-cell">
		<div class="weui-cell__hd">
			<img class="left-icon" alt="" src="<c:url value="/images/we/registration/security-code.png" />">
		</div>
		<div class="weui-cell__bd getcode">
			<input class="weui-input selected-color input-code" id="code" type="text" placeholder="验证码">
			<div class="btn-code">
				<input type="button" class="btn-text" id="btn-get" onclick="getCode()" value="获取验证码"></input>
			</div>
		</div>
	</div>
	
	<div class="weui-cell">
		<div class="weui-cell__hd">
			<img class="left-icon" alt="" src="<c:url value="/images/we/registration/password.png" />">
		</div>
		<div class="weui-cell__bd">
			<input class="weui-input selected-color" id="password" type="text" placeholder="密码">
		</div>
	</div>
	
	<div class="weui-cell">
		<div class="weui-cell__hd">
			<img class="left-icon" alt="" src="<c:url value="/images/we/registration/password.png" />">
		</div>
		<div class="weui-cell__bd">
			<input class="weui-input selected-color" id="surepassword" type="text" placeholder="再次输入密码">
		</div>
	</div>
	
	
	<div class="weui-cell bottom-lab">
		<div class="weui-cell__bd">
			<a href="javascript:;" class="weui-btn weui-btn_primary bottom-btn">确定</a>
		</div>
	</div>
</div>




<%@ include file="/WEB-INF/views/shared/scripts/jquery.jsp"%>
<%@ include file="/WEB-INF/views/shared/scripts/jqweui.jsp"%>
<script>
  $("#city-picker").cityPicker({
    title: "请选择服务地区"
  });
</script>
<script type="text/javascript"> 

var countdown=60; 
var isphone=1;

function sendemail(){
    var obj = $("#btn-get");
    settime(obj);
    
    }
/*获取验证码*/
 
function getCode(){
	checkPhone(); //验证手机号码
	if(isPhone){
		sendemail(); //倒计时
	}else{
		$('#phone').focus();
	}
	
}
//验证手机号码
function checkPhone(){
	var phone = $('#phone').val();
	var pattern = /^1[0-9]{10}$/;
	isPhone = 1;
	if(phone == '') {
		$.toast("请输入手机号", "cancel");
		isPhone = 0;
		return;
	}
	if(!pattern.test(phone)){
		$.toast("手机号有误", "cancel");
		isPhone = 0;
		return;
	}
}

function settime(obj) { //发送验证码倒计时
    if (countdown == 0) { 
        obj.attr('disabled',false); 
        //obj.removeattr("disabled"); 
        obj.val("获取验证码");
        countdown = 60; 
        return;
    } else { 
        obj.attr('disabled',true);
        obj.val("(" + countdown + ")s后重发");
        countdown--; 
    } 
setTimeout(function() { 
    settime(obj) }
    ,1000) 
}
</script>
<%@ include file="/WEB-INF/views/shared/master/weContentFooter.jsp"%>